package com.springboot.drools.controller;


import com.springboot.drools.entity.Order;
import com.springboot.drools.service.OrderService;
import org.mvel2.ast.Or;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author xiaojf
 */
@RestController
public class OrderController {

    @Autowired
    private OrderService orderService;

    @GetMapping("executeRules")
    public Order executeRules(@RequestBody Order order) {
        return orderService.executeRules(order);
    }

}
